/*
 * @Author: your name
 * @Date: 2021-12-22 18:40:23
 * @LastEditTime: 2021-12-22 18:50:35
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /project_am/am-server/app/controller/grade.js
 */
const { Controller } = require('egg');
const Message = require('../utils/Message')

/**
* @Controller grade-controller:成绩相关接口
*/
class GradeController extends Controller {

     /**
  * @Router get /grade/findGradeByID
  * @summary 根据学生id查询成绩
  * @request query string *id 学生id
  * @apikey
 */
   async findGradeByID () {
    const { ctx, service } = this
    const id = ctx.query.id
    const grade = await service.grade.findGradeByID(id)

    ctx.body = Message.success(grade)
  }
}
module.exports = GradeController;